package common {
import flash.display.DisplayObject;
import flash.text.TextFieldAutoSize;

import mx.controls.Label;
import mx.core.UITextField;

public class MultiLineLabel extends Label {

    override protected function createChildren():void {
        // Create a UITextField to display the label.
        if (!textField) {
            textField = new UITextField();
            textField.styleName = this;
            addChild(DisplayObject(textField));
        }
        super.createChildren();
        textField.multiline = true;
        textField.wordWrap = true;
        textField.autoSize = TextFieldAutoSize.LEFT;
    }
}
}